home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d21 / dvglue10.arc / TVUI.H < prev    next >
C/C++ Source or Header  |  1988-08-13  |  3KB  |  68 lines

  1. #ifndef DVGLUE_version
  2. #error Include TVAPI.H before this file
  3. #endif
  4.  
  5. /***********************************************************/
  6. /* Constants for UImenu_build() and typedef MENU_ITEM      */
  7. /***********************************************************/
  8.  
  9. /* types of menu items */
  10. #define M_END     0     /* marks end of array of menu items */
  11. #define M_ITEM    1     /* menu selection */
  12. #define M_SPECIAL 2     /* special key.  Text after last blank is  */
  13.                         /* right-justified as menu key             */
  14. #define M_TEXT    3     /* descriptive text, not a selection */
  15. #define M_HTEXT   4     /* highlighted version of above */
  16. #define M_CENTER  5     /* centered text, not a selection */
  17. #define M_HCENTER 6     /* highlighted version of above */
  18. #define M_SEP     7     /* separator line, item.key1 is replicated */
  19. #define M_IGNORE  8     /* ignore this entry.  Useful for "commenting out" */
  20.  
  21. /* actions returned by test function, may be ORed together */
  22. #define MA_REDO   0     /* read menu again  \ mutually exclusive */
  23. #define MA_DONE   1     /* return to caller /                    */
  24. #define MA_BEEP   2     /* beep, then do anything else indicated */
  25. #define MA_RESET  4     /* reset all "selected" bits */
  26. #define MA_SELECT 8     /* change "selected" bits to reflect changed values */
  27.  
  28. /* errors returned by UIbuild_menu() */
  29. #define ME_NOMEM     (void *) -1   /* unable to malloc() memory */
  30. #define ME_TOOBIG    (void *) -2   /* menu wouldn't fit on screen */
  31. #define ME_BADITEM   (void *) -3   /* bad entry in array of menu items */
  32.  
  33. /*-------------------------------------------------------*/
  34. /* Types for UImenu_build() and UImenu_show()            */
  35.  
  36. typedef struct
  37.    {
  38.    char *title ;
  39.    int row ;
  40.    int col ;
  41.    int left_button ;
  42.    int right_button ;
  43.    int allow_kbd ;
  44.    char marker ;
  45.    } MENU_OPTIONS ;
  46.  
  47. typedef struct
  48.    {
  49.    char type ;
  50.    char *entry ;
  51.    BYTE key1 ;
  52.    BYTE key2 ;
  53.    BYTE selected ;
  54.    } MENU_ITEM ;
  55.  
  56. /***********************************************************/
  57. /*           the user-interface function calls             */
  58. /***********************************************************/
  59.  
  60. void * pascal UImenu_build(MENU_ITEM *menu_items,MENU_OPTIONS *menu_options) ;
  61. int pascal UImenu_show(void *menu,int reset,int (*test)(OBJECT,int,char *),
  62.                        char *result) ;
  63. OBJECT pascal UIwin_open(OBJECT parent,int minrows,int mincols,
  64.                          int maxrows,int maxcols,int defrows,int defcols) ;
  65. void (* pascal UIsignal(int signal,OBJECT window,
  66.                             void (*handler)(NOTIFY_MSG far *)))(NOTIFY_MSG far *) ;
  67.  
  68.